//=============================================================================

#include "../../../../inc/aStarsSystem.h"

//=============================================================================

aStarsSystem::aStarsSystem()
{
  name = "Nameless stars system";
}

//=============================================================================

void aStarsSystem::asDrawSystem()
{
  aItem<aStar>* tmpStar = stars.alGetFirstItem();

  while(tmpStar)
  {
    tmpStar->data.asDrawStar();

    tmpStar = tmpStar->next;
  }

  aItem<aPlanet>* tmpPlanet = planets.alGetFirstItem();

  while(tmpPlanet)
  {
    tmpPlanet->data.apDrawPlanet();

    tmpPlanet = tmpPlanet->next;
  }
}

//=============================================================================

void aStarsSystem::asBornTest()
{
  aItem<aStar>* tmpStar = stars.alAddItem();

  tmpStar->data.shape.amLoadModel("source\\sphere.tm");
  tmpStar->data.shape.color[0] = tmpStar->data.color[0];
  tmpStar->data.shape.color[1] = tmpStar->data.color[1];
  tmpStar->data.shape.color[2] = tmpStar->data.color[2];
  tmpStar->data.shape.asScaleA(aVector(100.0f, 100.0f, 100.0f));
  tmpStar->data.shape.amResetVertexesToBind();

  tmpStar->data.shape.asLoadSkin("source\\plane.tga");
}

//=============================================================================

aStarsSystem::~aStarsSystem()
{
}

//=============================================================================
